/**
 * 
 */
package trigger;

/**
 * @author Philip
 *
 */
public abstract class CommandResponseFlag extends TriggerFlagger {

	public CommandResponseFlag(Trigger flaggedTrigger) {
		super(flaggedTrigger);
	}
	
	public String response() {
		StringBuilder newResponse = new StringBuilder();
		
		for (int i = 0; i < linesInResponse() - 1; i++) {
			newResponse.append(command() + " :" + flaggedTrigger.response(i) + "\n");
		}
		
		newResponse.append(command() + " :" + flaggedTrigger.response(linesInResponse() - 1));
		
		return newResponse.toString();
	}
	
	public abstract String command();
}
